// cover some element-ui styles
:root:root {
  /* ------------------------------
   * Radius (统一圆角)
   * ------------------------------ */
  --el-border-radius-small: 3px;
  --el-border-radius-base: 6px;
  --el-border-radius-large: 12px;
  --el-border-radius-round: 999px;
  --el-border-radius-circle: 50%;

  /* ------------------------------
   * Layout & Sizing (布局尺寸)
   * ------------------------------ */
  --el-menu-item-height: 43px;

  /* ------------------------------
   * Menu (菜单组件)
   * ------------------------------ */
  --el-menu-hover-bg: var(--theme-primary-light);
  --el-menu-text-color: var(--theme-primary);

  /* ------------------------------
   * Table (表格组件)
   * ------------------------------ */
  --el-table-th-bg: #fafafa;
  --el-table-th-color: rgba(0, 0, 0, 0.88);

  /* ------------------------------
   * Input (输入框组件)
   * ------------------------------ */
  --el-input-bg: rgba(243, 243, 243, 0.76);
  --el-input-bg-hover: rgb(228, 228, 228);
  --el-input-bg-active: rgb(215, 215, 215);
  --el-input-boxshadow: 0px 1px 2px rgba(0, 0, 0, 0.1);

  /* ------------------------------
   * Card (卡片组件)
   * ------------------------------ */
  --el-card-padding: 15px 20px;

}

/* -------------------------------------
 * 🌙 Dark Mode Override
 * ------------------------------------- */
html.dark {
  /* 默认通用 */
  --el-bg-color: #141414;
  --el-bg-color-overlay: #1d1e1f;
  --el-text-color-primary: #ffffff;
  --el-text-color-regular: #d0d0d0;
  --el-border-color: #434343;
  --el-border-color-light: #434343;
  /* Table */
  --el-table-th-bg: #1d1d1d;
  --el-table-th-color: rgba(255, 255, 255, 0.85);

  /* Menu */
  --el-menu-hover-bg: hsl(216 5% 19%);
  --el-menu-text-color: hsl(0 0% 95%);

  /* Input */
  --el-input-bg: #2f313b;
  --el-input-bg-hover: #3c3e4b;
  --el-input-bg-active: #1d1d26;
  --el-input-boxshadow: 0px 1px 2px rgba(0, 0, 0, 0.1);
}

.el-breadcrumb__inner,
.el-breadcrumb__inner a {
  font-weight: 400 !important;
}

.el-upload {
  input[type="file"] {
    display: none !important;
  }
}

.el-upload__input {
  display: none;
}

.cell {
  .el-tag {
    margin-right: 0px;
  }
}

.small-padding {
  .cell {
    padding-left: 5px;
    padding-right: 5px;
  }
}

.fixed-width {
  .el-button--mini {
    padding: 7px 10px;
    width: 60px;
  }
}

.status-col {
  .cell {
    padding: 0 10px;
    text-align: center;

    .el-tag {
      margin-right: 0px;
    }
  }
}

// to fixed https://github.com/ElemeFE/element/issues/2461
.el-dialog {
  //transform: none;
  //left: 0;
  //position: relative;
  //margin: 0 auto;
}
.el-dialog__body {
  padding: 4px;
}
// refine element ui upload
.upload-container {
  .el-upload {
    width: 100%;

    .el-upload-dragger {
      width: 100%;
      height: 200px;
    }
  }
}

// dropdown
.el-dropdown-menu {
  a {
    display: block
  }
}

// fix date-picker ui bug in filter-item
.el-range-editor.el-input__inner {
  display: inline-flex !important;
}

// to fix el-date-picker css style
.el-range-separator {
  box-sizing: content-box;
}

.el-menu--collapse
> div
> .el-submenu
> .el-submenu__title
.el-submenu__icon-arrow {
  display: none;
}

.el-dropdown .el-dropdown-link{
  color: var(--el-color-primary) !important;
}

//el-menu
.el-menu-item{
  margin: 0 6px 10px 6px !important;
}
.el-menu-dark{
  .sub-menu-title-noDropdown,
  .el-sub-menu__title {
    &:hover {
      background-color: hsl(216 5% 19%) !important;
      border-radius: 6px !important;
      color: hsl(0 0% 95%) !important;
    }
  }
  .nest-menu .el-sub-menu>.el-sub-menu__title,
  .el-menu-item {
    &:hover {
      background-color: hsl(216 5% 19%) !important;
      border-radius: 6px !important;
      color: hsl(0 0% 95%) !important;
    }
  }
}

.el-menu-light{
  .sub-menu-title-noDropdown,
  .el-sub-menu__title {
    &:hover {
      background-color: rgba(0, 0, 0, 0.06) !important;
      border-radius: 6px !important;
    }
  }
  .nest-menu .el-sub-menu>.el-sub-menu__title,
  .el-menu-item {
    &:hover {
      background-color: var(--theme-light-el-menu-hover-bg) !important;
      border-radius: 6px !important;
      color: var(--theme-light-el-menu-text-color) !important;
    }
  }
}
.el-menu-item.submenu-title-noDropdown,.el-sub-menu{
  margin:0px 6px 10px 6px !important;
}
.el-menu-item{
  &:hover{
    background: var(--el-color-primary) !important;
    border-radius: 6px;
  }
  &.is-active{
    //background: var(--el-color-primary) !important;
    color: #fff !important;
    border-radius: 6px;
    position: relative;
    color: var(--el-color-primary) !important;
    &::before{
      z-index: auto;
      background-color: rgba(var(--el-color-primary-rgb), 0.1);
      content: "";
      position: absolute;
      left: 8px;
      right: 8px;
      top: 0;
      bottom: 0;
      pointer-events: none;
      border-radius: 3px;
      transition: background-color .3s , border-color .3s;
      border-left: 4px solid var(--el-color-primary);
      left: 8px;
      right: 8px;
      margin: -6px;
    }
    &:hover{
      background-color: rgb(22,119,255,0.1);
    }
  }
}

.el-menu--sub-item{
  .el-menu-item{
    margin: 0 5px 10px 5px !important;
  }
}

//card
.el-card{
  border:none !important;
  border-radius:var(--el-border-radius-base) !important;
}


//table
.el-table th.el-table__cell{
  background: var(--el-table-th-bg) !important;
  color: var(--el-table-th-color) !important;
}

//drawer
.el-drawer__body{
  padding: 0 25px !important;
}

//message-box
.el-message-box{
  border-radius: 8px !important;
}

.el-form .el-form-item__label{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  display: inline-block;
  text-align: right;
}

//segmented
.el-segmented{
  --el-segmented-bg-color:rgba(243, 243, 243, .76) !important;
  --el-segmented-item-selected-bg-color: var(--el-bg-color-overlay) !important;
  --el-segmented-item-selected-disabled-bg-color: #f2f2f2 !important;
  --el-segmented-item-selected-color: rgb(30, 30, 30) !important;
}

.dark{
  .el-segmented{
    --el-segmented-bg-color: #2f313b !important;
    --el-segmented-item-selected-bg-color: #4d4d57 !important;
    --el-segmented-item-selected-color:rgb(235, 235, 235) !important;
  }
}

.el-segmented__group {
  padding: 2px;
}

.el-segmented__item-selected {
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02);
}

.el-upload{
  --el-upload-dragger-padding-horizontal: 20px !important;
}

//button
.el-button.is-plain{
  background: transparent !important;
  &:hover{
    background: transparent !important;
  }
}
.el-button--primary.is-plain:hover {
  color: var(--el-color-primary);
}

.el-button--success.is-plain:hover {
  color: var(--el-color-success);
}

.el-button--warning.is-plain:hover {

  color: var(--el-color-warning);
}

.el-button--danger.is-plain:hover {
  color: var(--el-color-danger);
}

.el-button--info.is-plain:hover {
  color: var(--el-color-info);
}

//el-input
//.el-input__wrapper,.el-select__wrapper,.el-textarea__inner{
//  background-color: var(--el-input-bg);
//  box-shadow: none !important;
//  border:.1rem transparent solid;
//  &:focus-within{
//    background-color: var(--el-bg-color-overlay);
//    border: 1px solid var(--el-color-primary);
//  }
//  &:hover{
//    border: 1px solid var(--el-color-primary);
//  }
//}
//
//.is-disabled{
//  .el-input__wrapper,.el-select__wrapper,.el-textarea__inner{
//    background-color: var(--el-input-bg) ;
//    box-shadow: none !important;
//    color: #333333;
//    &:focus-within{
//      border: 1px rgba(0,0,0,0) solid;
//    }
//    &:hover{
//      border: 1px rgba(0,0,0,0) solid ;
//    }
//  }
//}
//.el-input-group__append{
//  box-shadow: none !important;
//}
//
//.el-select__selection .el-tag{
//  background-color: var(--el-bg-color-overlay);
//}
//.el-cascader__tags .el-tag {
//  background-color: var(--el-bg-color-overlay) !important;
//}

//修改el-tag样式
.el-tag {
  height: 26px !important;
  line-height: 26px !important;
  border: 0 !important;
  border-radius: 6px !important;
  font-weight: bold;
  transition: all 0s !important;
}

// 修改 el-select 样式
.el-select-dropdown__list {
  padding: 5px !important;

  .el-select-dropdown__item {
    height: 38px !important;
    line-height: 38px !important;
    border-radius: 6px !important;
    //&:hover {
    //  background-color: var(--gray-200) !important;
    //}
  }

  .el-select-dropdown__item:hover ~ .is-selected,
  .el-select-dropdown__item.is-selected:has(~ .el-select-dropdown__item:hover) {
    background-color: transparent !important;
  }
}

.el-popover {
  min-width: 80px;
}

// 实现水波纹在文字下面效果
.el-button > span {
  position: relative;
  z-index: 10;
}

.el-button.is-loading{
  border:none !important;
}

.el-message__content{
  color: #666 !important;
}

.el-dialog.is-fullscreen{
  width: 100% !important;
  .el-dialog__body{
    max-height: none !important;
    height: calc(100% - 100px) !important;
  }
}

